<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>邀请好友</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<!-- Mobile Devices Support @begin -->
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type" />
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control" />
<meta content="no-cache" http-equiv="pragma" />
<meta content="0" http-equiv="expires" />
<meta content="telephone=no, address=no" name="format-detection" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link href="__Home__/css/base.css" rel="stylesheet" type="text/css">
<link href="__Home__/css/div.css" rel="stylesheet" type="text/css">
<script src="__Home__/js/jquery.min.js"></script>
<script type="text/javascript">
var imgUrl = "{$imgurl}";
var lineLink = "{$lineLink}";
var descContent ="{$descContent}";
var shareTitle = '分享';
var appid ="{$appid}";
function shareFriend(){
    WeixinJSBridge.invoke('sendAppMessage',{
                            "appid":appid,
                            "img_url":imgUrl,
                            "img_width":"640",
                            "img_height":"640",
                            "link":lineLink,
                            "desc":descContent,
                            "title":shareTitle,
                            }, function(res) {
                               _report('send_msg', res.err_msg);
                            })
}
function shareTimeline(){
    WeixinJSBridge.invoke('shareTimeline',{
                            "img_url":imgUrl,
                            "img_width":"640",
                            "img_height":"640",
                            "link":lineLink,
                            "desc": descContent,
                            "title": shareTitle,
                            }, function(res) {
                               _report('timeline', res.err_msg);
                            });
}
function shareWeibo() {
    WeixinJSBridge.invoke('shareWeibo',{
                            "content":descContent,
                            "url":lineLink,
                            }, function(res) {
                              _report('weibo', res.err_msg);
                            });
}
// 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        // 发送给好友
        WeixinJSBridge.on('menu:share:appmessage', function(argv){
            shareFriend();
            });
        // 分享到朋友圈
        WeixinJSBridge.on('menu:share:timeline', function(argv){
            shareTimeline();
            });
        // 分享到微博
        WeixinJSBridge.on('menu:share:weibo', function(argv){
            shareWeibo();
            });
        }, false);
</script>
</head>
<body>
<div class="wrap" style="margin-top:30px; margin-left:5px; margin-right:5px;">
	 <div class="main" style="margin:5px 10px;" func="{$openid}">
    	<div style="margin:5px; font-size:18px;margin-top:60px;">推广好友玩应用，收益停不下来啦！</div>
    	<div style="margin:5px">{$descContent}</div>
    	<div style="margin:5px">{$myurl}</div>
    </div>
</div>
</body>
</html>
